# -*- coding: utf-8 -*-
"""
@Time : 2024/2/26 1:12 PM
@Author: imamhusan
@Des: 描述
"""
from fastapi import APIRouter, Request
from fastapi.templating import Jinja2Templates
from config import settings

router = APIRouter()


template = Jinja2Templates(directory=settings.TEMPLATE_DIR)


@router.get('/', description='首页模块')
async def home_page(req: Request):
    data = 'ozhas'
    return template.TemplateResponse(name='index.html', context={'request': req, 'data': data})


@router.get('/printer')
async def home_page(req: Request):
    data = 'ozhas'
    return template.TemplateResponse(name='printer.html', context={'request': req, 'data': data})